<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">月套餐</a></li>
        <li ><a href="{:U('AdminPackage/index',array('op'=>'package_add'))}">增量包</a></li>
        <li><a href="{:U('AdminPackage/add',array('id'=>empty($item['id'])?'':$item['id']))}" target="_self">新增</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('AdminPackage/index')}">

    </form>
    <form class="js-ajax-form" action="" method="post">

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <notempty name="list">
                    <th width="50">{:L('SORT')}</th>
                </notempty>
               <td>套餐类型</td>
				<td>流量(M)</td>
				<td>价格</td>
				<td>流量标题</td>
				<td>价格标题</td>
				<td>创建时间</td>
				<td>操作</td>
            </tr>
            </thead>
            <foreach name="list" item="vo">
                <tr <if condition="$vo['package_status'] != 1">style='background-color: gray;'</if>>
                    <notempty name="list">
                        <td><input name="listorders[{$vo.package_id}]" class="input input-order" type="text" size="5" value="{$vo.sort}"></td>
                    </notempty>
                    <td>
                        <if condition="$vo['package_status'] != 1">（已关闭的）</if>
                        <if condition="$vo['package_type'] == 1">月套餐<else/>增量包</if>
                    </td>
					<td>{$vo.package_data}</td>
					<td>{$vo.package_price}</td>
					<td>{$vo.package_title_data}</td>
					<td>{$vo.package_title_price}</td>
					<td>{$vo.create_time}</td>
					<td>
                        <if condition="$vo['package_status'] == 1">
                            <a href="{:U('AdminPackage/open_or_close',array('id'=>$vo['package_id'],'active'=>'close'))}">关闭</a>
                            |<a href="{:U('AdminPackage/add',array('id'=>$vo['package_id']))}">编辑</a>
                            <if condition="$vo['package_id'] != 1">
                                | <a href="{:U('AdminPackage/delete',array('id'=>$vo['package_id']))}">删除</a>
                            </if>
                        <else/>
                            <a href="{:U('AdminPackage/open_or_close',array('id'=>$vo['package_id'],'active'=>'open'))}">打开</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            <div class="table-actions">
                <notempty name="list">
                    <button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminPackage/listorders')}">{:L('SORT')}</button>
                </notempty>
            </div>
        </table>

        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location = "{:U('AdminPost/index',$formget)}";
        }
    }

</script>
</body>
</html>